package com.ysd.lis.controller;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.WkEmployeeContract;
import com.ysd.lis.service.WkEmployeeContractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 员工档案-合同表 前端控制器
 * </p>
 *
 * @author LiuQi
 * @since 2024-02-23
 */
@RestController
@RequestMapping("/wk/employeeContract")
public class WkEmployeeContractController extends BaseController {


    @Autowired
    WkEmployeeContractService wkEmployeeContractService;

    @GetMapping("/getEmployeeContractList/{wkEmployeeId}")
    public Result getEmployeeContractList(@PathVariable("wkEmployeeId") String wkEmployeeId) {
        return wkEmployeeContractService.getEmployeeContractList(wkEmployeeId);
    }

    @PostMapping("/addEmployeeContract")
    public Result addEmployeeContract(@RequestBody WkEmployeeContract wkEmployeeContract) {
        return wkEmployeeContractService.addEmployeeContract(wkEmployeeContract);
    }

    @PostMapping("/updateEmployeeContract")
    public Result updateEmployeeContract(@RequestBody WkEmployeeContract wkEmployeeContract) {
        return wkEmployeeContractService.updateEmployeeContract(wkEmployeeContract);
    }

    @PostMapping("/deleteEmployeeContract")
    public Result deleteEmployeeContract(@RequestBody WkEmployeeContract wkEmployeeContract) {
        return wkEmployeeContractService.deleteEmployeeContract(wkEmployeeContract);
    }
}
